﻿using Microsoft.Extensions.Options;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Test1
    {
        private readonly IOptionsSnapshot<Employee> optEmp;

        public Test1(IOptionsSnapshot<Employee> optEmp)
        {
            this.optEmp = optEmp;
        }

        public void Test()
        {
            Console.WriteLine(optEmp.Value.Name);
            Console.WriteLine(optEmp.Value.Salary);
        }
    }
}
